using System.Collections;
using System.Collections.Generic;
using System.Linq;

namespace ZSW.Framework.Utils
{
    public static class ZSWFUtil_Array
    {
        public static bool TryAdd<T>(this List<T> list, T item)
        {
            if (list == null)
            {
                list = new List<T>();
            }

            if (list.Contains(item))
            {
                return false;
            }

            list.Add(item);
            return true;
        }
    }
}